package de.tsajar.es.networking.messages;

import com.jme3.network.AbstractMessage;
import com.jme3.network.serializing.Serializable;
import com.simsilica.es.Entity;
import java.util.Set;

/**
 * Entities on the host side have changed, changes are sent to client
 *
 * @author Eike Foede
 */
@Serializable
public class EntityChangeMessage extends AbstractMessage {

    private long esId;
    private long time;
    public Set<Entity> added;
    private Set<Entity> changed;
    private Set<Entity> removed;

    public EntityChangeMessage() {
    }

    public EntityChangeMessage(long id, long time, Set<Entity> added, Set<Entity> changed, Set<Entity> removed) {
        this.esId = id;
        this.time = time;
        this.added = added;
        this.changed = changed;
        this.removed = removed;
    }

    public long getId() {
        return esId;
    }

    public long getTime() {
        return time;
    }

    public Set<Entity> getAdded() {
        return added;
    }

    public Set<Entity> getChanged() {
        return changed;
    }

    public Set<Entity> getRemoved() {
        return removed;
    }
}
